home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 1.2 KB | 57 lines | [TEXT/ToyS] |
- on idle
- set dims to random number from 200 to 500
- set midP to round (dims / 2)
- set incr to random number from 2 to 11
-
- set drawWin to ¬
- display drawing titled ¬
- "Spiral 1.0" with dimensions {dims, dims}
-
- -- Set color
- draw into drawWin ¬
- using state {fg col64:{random number from 1 to 33333, random number from 1 to 33333, random number from 1 to 33333}}
-
- set box to {0, 0, dims, dims}
-
- -- Across the top
- repeat with x from 0 to midP by incr
- draw an arc into drawWin ¬
- inside of box ¬
- with scale {0, 90} -- TC to CR
-
- -- Pull up bottom
- set item 4 of box to (item 4 of box) - incr
-
- draw an arc into drawWin ¬
- inside of box ¬
- with scale {90, 90} -- CR to BC
-
- -- Pull in left
- set item 1 of box to (item 1 of box) + incr
-
- draw an arc into drawWin ¬
- inside of box ¬
- with scale {180, 90} -- BC to CL
-
- -- Pull down top
- set item 2 of box to (item 2 of box) + incr
-
- draw an arc into drawWin ¬
- inside of box ¬
- with scale {270, 90} -- CL to TC
-
- -- Pull in right
- set item 3 of box to (item 3 of box) - incr
- end repeat
-
- -- Refresh
- draw into drawWin ¬
- with refresh
-
- pause for 5 with seconds timing
-
- display drawing drawWin with disposal
-
- return 5
- end idle
-